package string;

public class CarAtDemo {
    public static void main(String[] args) {
        // 字符串的索引
        String str = "Hello World";
        System.out.println(str.charAt(0));
        for (int i = 0; i < str.length(); i++){
            if (str.charAt(i)=='o'){
                System.out.println(i);
                System.out.println("下标的字母："+str.charAt(i));
            }
        }
    }
}
